using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using Library.Business;

namespace HoaDonNuoc.Interface
{
    public partial class frmNghiepCuu : DevExpress.XtraEditors.XtraForm
    {
        public frmNghiepCuu()
        {
            InitializeComponent();
        }

        private void simpleButton1_Click(object sender, EventArgs e)
        {
            //
            Cls_HeThongNuoc[] arr = Cls_HeThongNuoc.getArrayObject();
            foreach (Cls_HeThongNuoc htn in arr)
            {
                MessageBox.Show(htn.TenHeThong);
            }

        }

        private void simpleButton2_Click(object sender, EventArgs e)
        {
            //
            DataTable dt = Library.DBcommon.GetDataTable_SQL("Select * From tbHeThongNuoc Where ID_HeThongNuoc<>'NP'");
            Cls_HeThongNuoc[] arr = Cls_HeThongNuoc.getArrayObject(dt);
            foreach (Cls_HeThongNuoc htn in arr)
            {
                MessageBox.Show(htn.TenHeThong);
            }
        }

        private void simpleButton3_Click(object sender, EventArgs e)
        {
            DataTable dt = Library.DBcommon.GetDataTable_SQL("Select * From tbHeThongNuoc");
             foreach (DataRow dr in dt.Rows)
            {
                string tenHT = dr[Cls_HeThongNuoc.fn_TenHeThong].ToString();
                MessageBox.Show(tenHT);
             }
        }

        private void simpleButton4_Click(object sender, EventArgs e)
        {
            return;
            //
            Cls_HeThongNuoc _HTN = new Cls_HeThongNuoc();
            _HTN.ID_HeThongNuoc = "11";
            _HTN.TenHeThong = "11";
            _HTN.TenVietTat = "";
            _HTN.doInsert();
            //
            
            //Cls_HeThongNuoc _HTN = new Cls_HeThongNuoc();
            //_HTN.ID_HeThongNuoc_find = "11";
            //_HTN.ID_HeThongNuoc = "11";
            //_HTN.TenHeThong = "11";
            //_HTN.TenVietTat = "";
            //_HTN.doUpdate();
            //

        }

        private void simpleButton5_Click(object sender, EventArgs e)
        {
            //DataTable dt= Library.DBcommon.getDataTable_produce("Ten pro");
            //cls
        }
    }
}